package org.ttitfly.zuoyue.entity.complaint;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.ttitfly.ttcore.entity.IdEntity;

/**
 * 大客户投诉
 * 
 * 使用JPA annotation定义ORM关系. 使用Hibernate annotation定义JPA 1.0未覆盖的部分.
 * 
 * @author mhb
 */
@Entity
// 表名与类名不相同时重新定义表名.
@Table(name = "complaint_all")
// 默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Complaint extends IdEntity {

	private static final long serialVersionUID = 1L;

	// 投诉工单号
	@Column(name = "IMEP_ID")
	private String imepId;

	// 工单流水号
	@Column(name = "wo_id")
	private String woId;

	// 受理时间
	@Column(name = "deal_time")
	private Date dealTime;

	// 用户姓名
	@Column(name = "CUSTOMER_NAME")
	private String customerName;

	// 用户手机号
	@Column(name = "CUSTOMER_MOBILE")
	private String customerMobile;

	// 用户投诉内容
	@Column(name = "COMPLAINT_CONTENT")
	private String complaintContent;

	// 投诉地址
	@Column(name = "address")
	private String address;

	// 造成投诉原因
	@Column(name = "reason")
	private String reason;

	// 经度
	@Column(name = "longitude")
	private Double longitude;

	// 维度
	@Column(name = "latitude")
	private Double latitude;

	@Column(name = "resolve")
	private Boolean resolve;
	
	

	public Complaint(){
		
	}
	
	public Complaint(Long id,String imepId,String woId,Date dealTime,String customerName,String customerMobile,String complaintContent,String address,String reason,Double longitude,Double latitude ,Boolean resolve ){
		this.id = id;
		this.imepId = imepId;
		this.woId = woId;
		this.dealTime = dealTime;
		this.customerName = customerName;
		this.customerMobile = customerMobile;
		this.complaintContent = complaintContent;
		this.address = address;
		this.reason = reason;
		this.longitude = longitude;
		this.latitude = latitude;
		this.resolve = resolve;
		
	}

	public String getImepId() {
		return imepId;
	}

	public void setImepId(String imepId) {
		this.imepId = imepId;
	}

	
	public String getWoId() {
		return woId;
	}

	public void setWoId(String woId) {
		this.woId = woId;
	}

	public Date getDealTime() {
		return dealTime;
	}

	public void setDealTime(Date dealTime) {
		this.dealTime = dealTime;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getCustomerMobile() {
		return customerMobile;
	}

	public void setCustomerMobile(String customerMobile) {
		this.customerMobile = customerMobile;
	}

	public String getComplaintContent() {
		return complaintContent;
	}

	public void setComplaintContent(String complaintContent) {
		this.complaintContent = complaintContent;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	
	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Boolean getResolve() {
		return resolve;
	}

	public void setResolve(Boolean resolve) {
		this.resolve = resolve;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}